package vrp;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

//import java.util.Date;
import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class Distance {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @Persistent
    private long from;

    @Persistent
    private long to;

    @Persistent
    private double length;

    public Distance(long from, long to, double length) {
        this.from = from;
        this.to = to;
        this.length = length;
    }

    public Key getKey() {
        return this.key;
    }

    public long getFrom() {
        return this.from;
    }

    public long getTo() {
        return this.to;
    }

    public double getLength() {
        return this.length;
    }

    public void setKey(Key someKey) {
    	this.key = someKey;
    }

    public void setFrom(long from) {
        this.from = from;
    }

    public void setTo(long to) {
        this.to= to;
    }

    public void setLength(double length) {
        this.length = length;
    }
}